/**
 * Copyright 2011 Micro_SNS Group. All Right reserved.
 */
package com.team.sns.utils;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.UUID;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import sun.security.provider.MD5;

/**
 * @author seven zhao
 * @version 1.0
 * 功能说明：常用工具类
 *
 */
public class WebUtils {
	private static Log log = LogFactory.getLog(WebUtils.class);
	/**
	 * @return 使用uuid生成的字符串
	 */
	public static String getUUID(){
		return UUID.randomUUID().toString();
	}
	/**
	 * 
	 * @param str：需要转换的字符串
	 * @return 将输入的字符串使用MD5加密
	 */
	public static String getMD5String(String str){
		return com.team.sns.utils.MD5.MD5Encode(str);
	}
}
